package com.wmh.baseservice.admin.tools.enums;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 管理员信息状态
 * @author 谢骏
 */
public enum AdInfoStatus {
    /** 冻结*/
    FREEZE("冻结", -1),
    /** 正常*/
    NORMAL("正常", 0);

    private String label;

    private Integer value;

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    AdInfoStatus(String label, Integer value){
        this.value = value;
        this.label = label;
    }

    public static boolean hasValue(Integer value) {
        List<Integer> list = Arrays.stream(values()).map(AdInfoStatus::getValue).collect(Collectors.toList());
        return list.contains(value);
    }
}
